<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<base href="<%=basePath%>">
    <LINK rel="stylesheet" media="screen" type="text/css" title="Style" href="css/style.css">
    <script src="js/jquery.js" type="text/javascript"></script>
    <script src="js/simplemodal.js" type="text/javascript"></script>
    
    <title>Выбор необязательных дисциплин</title>
    <c:set value="${subjects}" var="subjects" />
</head>
<body>
	<div id="background_image">
        <div id="content">
        	<div id="header">
                <ul id="tabs">
                    <li id="interval_1">
                    </li>
                    <li id="houses">
                        <a href="houses">Факультеты</a>
                    </li>
                    <li id="interval_2">
                    </li>
                    <li id="professors">
                        <a href="professors">Профессоры</a>
                    </li>
                    <li id="interval_3">
                    </li>
                    <li id="students" class="current">
                        <a href="students">Студенты</a>
                    </li>
                    <li id="interval_4">
                    </li>
                    <li id="rating">
                        <a href="rating">Рейтинг</a>
                    </li>
                    <li id="interval_5">
                    </li>
                    <li id="subjects">
                        <a href="subjects">Дисциплины</a>
                    </li>
                    <li id="interval_6">
                    </li>
                    <c:if test="${userRole == 3 || userRole == 0}">
	                    <li id="rooms">
	                        <a href="rooms">Общежитие</a>
	                    </li>
                    </c:if>
                    <c:if test="${userRole == 1 || userRole == 2 || userRole == 4 || userRole == 5}">
                    	<li id="blank">
	                    </li>
                    </c:if>
                    <li id="interval_7">
                    </li>
                </ul>
                <div id="message">
                	
                </div>
            </div>
            <div id="book">
                <div id="left_page">
                    <div id="title_left_page">
                        <img src="img/coat_of_arms.png" alt="Coat of Arms of Hogwarts" />
                        <h5>
                            Академия Чародейства и
                            <br />
                            Волшебства "Хогвартс"
                        </h5>
                    </div>
                    <div id="user">
                        <div class="welcome">
                            <h2>
                                <span>Д</span>обро пожаловать,
                                <p class="userName">
                                	${userFN} ${userLN}
                                </p>
                            </h2>
                        </div>
                        <div class="profile">
                            <h4>
                            	<c:if test="${userRole == 5 && choiceTime==true}">
		                            <a href="choice"><span>В</span>ыбор дисиплин</a>
		                            <br />
	                            </c:if>
								<c:if test="${userRole <= 2 && expulsionTime==true}">
		                            <a href="expulsion"><span>С</span>туденты на отчисление</a>
		                            <br />
	                            </c:if>
                                <a href="messages"><span>С</span>ообщения (${countMess})</a>
                                <br />
                                <a href="#change_password"><span>С</span>менить пароль</a>
                                <br />
                                <a href="logout"><span>В</span>ыход</a>
                            </h4>
                        </div>
                        <div class="action">
                            <h4>
                                <a href="messages"><span>В</span>се сообщения</a>
                                <BR><a href="messages?do=in"><span>В</span>ходящие</a>
                                <BR><a href="messages?do=out"><span>О</span>тправленные</a>
                            </h4>
                        </div>
                    </div>
                </div>
                <div id="right_page">
                    <div id="title_right_page">
                        <img src="img/coat_of_arms.png" alt="Coat of Arms of Hogwarts" />
                        <h3><span>С</span>ообщения</h3>
                    </div>
                    <div id="list">
                    <h2 style="text-align:center;"><span>Д</span>исциплины сохранены.</h2>
                    </div>
                </div>
            </div>
            <div id="footer">
                <h1>
                    © 2010 Hogwarts. All rights reserved
                    <br />
                    Powered by SMC
                </h1>
            </div>
        </div>
    </div>
    <c:if test="${countMess != 0}">
	    <script type="text/javascript">
	    var temp="<div><img src='img/owl.png' alt=''style='float:left'><h3><a href='messages/info?id="
		    +${unreadedMess}+"'> <span>В</span>ам пришло новое сообщение!</a></h3></div>";
	        $.modal(temp);
	    </script>
	</c:if>
</body>
</html>